package cn.wolfcode.education.service.impl;

import cn.wolfcode.education.domain.TransferHistory;
import cn.wolfcode.education.mapper.TransferHistoryMapper;
import cn.wolfcode.education.query.TransferHistoryQuery;
import cn.wolfcode.education.service.ITransferHistoryService;
import cn.wolfcode.education.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TransferHistoryServiceImpl implements ITransferHistoryService {

    @Autowired
    private TransferHistoryMapper transferHistoryMapper;

    public PageResult query(TransferHistoryQuery qo) {
        int total = transferHistoryMapper.queryForCount(qo);
        List<TransferHistory> rows = transferHistoryMapper.queryForList(qo);
        return new PageResult(total, rows);
    }
}
